<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>//构造函数 命名，单词首字母均为大写
    function CreateMovie(movieName,type,rate,showTime){
        this.movieName=movieName;
        this.type =type;
        this.showTime=showTime;
        this.getNextShowing = function(){
            var current =10;
            for(var i=0;i<this.showTime.length;i++){

                var timer = parseInt(this.showTime[i]);
                if (current<timer) {
                    console.log(this.movieName +"现已次播放时间为12.00");
                    break;
                }


            }

        }

    }
//对象实例化过程  需要使用关键词  new
    var movie1 =new CreateMovie("001","谍战类","9.0",["12.00","15.00","17.00"]);
    movie1.getNextShowing();
    </script>
</html>